open("out.txt","w").write('\n'.join(open("in.txt").read().split("\n")[::-1])) 

